home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
dev
/
amos
/
sillysource5.lha
/
CHASE.AMOS
/
CHASE.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1980-01-18
|
6KB
|
208 lines
Screen Open 1,320,200,16,Lowres : Curs Off : Flash Off : Hide On : Break Off
Dim NAME$(40),LE(40),POS(40),TR$(13) : Sam Bank 12
Dim XB(13),YB(13),PCK(51) : D$=Dir$
Dim X1(30),Y1(30),X2(30),Y2(30),TROLL$(13)
Rem CHASE THE TROLL
Fade 3 : Wait 40 : Cls : GUESS=0 : DADSC=0 : MUMSC=0
F$="HD" : If Exist(F$)=True Then HD=1 Else HD=0
XB(1)=148 : YB(1)=20 : XB(2)=188 : YB(2)=20 : XB(3)=230 : YB(3)=20
XB(4)=268 : YB(4)=20
XB(5)=148 : YB(5)=60 : XB(6)=188 : YB(6)=60 : XB(7)=230 : YB(7)=60
XB(8)=268 : YB(8)=60
XB(9)=148 : YB(9)=100 : XB(10)=188 : YB(10)=100 : XB(11)=230 : YB(11)=100
XB(12)=268 : YB(12)=100
Unpack 14 To 1 : Wait Vbl
WIN:
If MUMSC=5
Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
Locate 0,23 : Paper 14 : Pen 1 : A$="Mummy wins the game" : Centre A$
SPEECH=Len(A$)*4
Sam Play 22 : Gosub ANI : Wait 20 : Goto PL_AGAIN
End If
If DADSC=5
Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
Locate 0,23 : Paper 14 : Pen 1 : A$="You win the game"
Centre A$
SPEECH=Len(A$)*5 : Sam Play 23 : Gosub ANI : Wait 20 : Goto PL_AGAIN
End If
If MUMSC>0 or DADSC>0 Then Goto SD
For X=1 To 12 : TROLL$(X)="" : Next X
For X=1 To 12 : PCK(X)=99 : Next X : COUNT=0
Restore N : For X=1 To 12 : Read T$ : TR$(X)=T$ : Next X
RANNUM:
If COUNT=12 Then Goto RANDI
CARD=Rnd(11)+1
For X=1 To 12
If PCK(X)=CARD Then Goto RANNUM
Next X
If COUNT<12 Then Inc COUNT : PCK(COUNT)=CARD : Goto RANNUM
RANDI:
T=0
DIT:
Restore N : Inc T
For X=1 To PCK(T)
Read T$
Next X
If T<12 Then TROLL$(T)=T$ : Goto DIT
SD:
Paper 2 : Bar 148,18 To 300,150
If GUESS>0
Gosub SCOS : Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
Locate 0,23 : Paper 14 : Pen 1 : A$="Let's find another troll"
Centre A$ : SPEECH=Len(A$)*4 : Sam Play 6 : Gosub ANI : Wait 20 : Goto GUES
End If
Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
Locate 0,23 : Paper 14 : Pen 1 : A$="Can you find a troll for mummy?"
Centre A$
SPEECH=Len(A$)*4 : Sam Play 1 : Gosub ANI : Wait 40
Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
Locate 0,23 : Paper 14 : Pen 1 : A$="You have three guesses"
Centre A$ : SPEECH=Len(A$)*4
Sam Play 2 : Gosub ANI : Wait 40
GUES:
GUESS=0
For X=1 To 12
Paste Bob XB(X)-1,YB(X)-1,18
Next X
Reserve Zone 6000
For X=1 To 4 : Set Zone X,XB(X),YB(X) To XB(X)+30,YB(X)+32 : Next X
For X=5 To 8 : Set Zone X,XB(X),YB(X) To XB(X)+30,YB(X)+32 : Next X
For X=9 To 12 : Set Zone X,XB(X),YB(X) To XB(X)+30,YB(X)+32 : Next X
CHOOSE_TROLL:
C=Rnd(11)+1 : CHOI=PCK(C)
If TROLL$(CHOI)="" Then Goto CHOOSE_TROLL
USED:
Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
If GUESS=3
Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
Locate 0,23 : Paper 14 : Pen 1 : A$="You have used up all your guesses"
Centre A$ : SPEECH=Len(A$)*3 : Sam Play 21 : Gosub ANI : Wait 40
Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
Locate 0,23 : Paper 14 : Pen 1 : A$="And now...here is the troll"
Centre A$ : SPEECH=Len(A$)*5 : Sam Play 7 : Gosub ANI : Wait 40
TTT=PCK(CHOI) : Inc MUMSC : Paste Bob XB(CHOI),YB(CHOI),TTT
Show On : Sam Play 24 : Wait 100 : Hide On
Goto WIN
End If
ST:
If GUESS=3 Then Gosub SCOS : Goto USED
Locate 0,23 : Paper 14 : Pen 1 : A$="Can you find "+TROLL$(CHOI)+"?"
Centre A$ : SPEECH=45 : Sam Play 3 : Gosub ANI : Wait 45 : Gosub SAMTROLL
A$=TROLL$(CHOI) : SPEECH=Len(A$)*4 : Sam Play SAM : Gosub ANI : Wait 20
Gosub SCOS
Show On
Timer=0 : R=0 : Repeat : CH=Mouse Zone
If Timer=500
R=Rnd(2)+1 : Paper 14 : Locate 1,23 : Print Space$(36) : Timer=0
End If
If R=1
Locate 0,23 : Paper 14 : Pen 1 : A$="Rock and Roll Mate" : Centre A$
SPEECH=Len(A$)*4 : Sam Play 25 : Gosub ANI : Wait 20 : R=0
End If
If R=2
Locate 0,23 : Paper 14 : Pen 1 : A$="Yeah, we're rockin'" : Centre A$
SPEECH=Len(A$)*4 : Sam Play 26 : Gosub ANI : Wait 20 : R=0
End If
If R=3
Locate 0,23 : Paper 14 : Pen 1 : A$="You're getting good at this game"
Centre A$ : SPEECH=Len(A$)*4 : Sam Play 27 : Gosub ANI : Wait 20 : R=0
End If
If Mouse Key=2
Hide On : Fade 3 : Wait 30 : Cls : Goto TITLE
End If
Until Mouse Key=1 and CH<>0
Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
Paste Bob XB(CH),YB(CH),PCK(CH) : Sam Play 24 : Wait 30 : Reset Zone CH
If CH<>CHOI
Hide On : Inc GUESS : Locate 0,23 : Paper 14 : Pen 1
A$="No that's not my baby" : Centre A$ : SPEECH=Len(A$)*4 : Sam Play 4
Gosub ANI : Wait 40 : Locate 0,23
Centre Space$(36) : Gosub SCOS : Goto ST
End If
If CH=CHOI
Hide On : Inc GUESS : Locate 0,23 : Paper 14 : Pen 1
A$="Well done, you found mummies troll" : Centre A$ : SPEECH=Len(A$)*4
Sam Play 5 : Gosub ANI : Inc DADSC : Wait 30 : Gosub SCOS : Goto WIN
End If
PL_AGAIN:
Pen 1 : Paper 14 : Locate 0,23 : Centre Space$(38) : Locate 0,23
A$="Would you like to play again?" : Centre A$ : SPEECH=Len(A$)*5
Sam Play 8 : Gosub ANI : Wait 80
Pen 1 : Paper 14 : Locate 0,23 : Centre Space$(38) : Locate 0,23
Centre "Left Mouse: Yes Right Mouse: No"
Wait 40 : Repeat : Until Mouse Key
If Mouse Key=1
Hide On : GUESS=0 : DADSC=0 : MUMSC=0 : Gosub SCOS : Goto WIN
End If
If Mouse Key=2
Hide On : Fade 3 : Wait 40 : Goto TITLE
End If
ANI:
Bob 1,57,45,1
M$="Anim 0,(14,5)(15,5)(16,5)(17,5)"
Channel 1 To Bob 1 : Amal 1,M$ : Amal On 1
Wait SPEECH
Amal Off 1 : Bob Off 1 : Return
SAMTROLL:
S=0 : Repeat
Inc S
Until TR$(S)=TROLL$(CHOI) : SAM=S+8
Return
N:
Data "Peeko Boo","Coco","April Tickety Boo","Chico","Poko Sue","Little Devil"
Data "Mini Mick","Sony","Punkie","Pinkety Boo","Wayne","Bony","Mr Cool"
SCOS:
Locate 2,15 : Paper 4 : Pen 1 : Print "Mummy:";MUMSC : Locate 2,17
Print "Sweetie:";DADSC : Locate 2,19 : Print "Guesses:";GUESS
Return
TITLE:
Erase All
If HD=0 Then Dir$="Maindisk:"
Run "PLAYTIME"